﻿<%@ Page Title="Publishing" Language="C#" MasterPageFile="~/Posts/Posts.master" AutoEventWireup="true" CodeFile="Publish.aspx.cs" Inherits="Posts_Publish" %>
<%@ Register src="Header.ascx" tagname="Header" tagprefix="uc2" %>
<asp:Content ID="Content3" ContentPlaceHolderID="phMain" Runat="Server">
    <uc2:Header ID="ucHeader" runat="server" />
    
    
    <asp:Panel ID="pnlPublished" CssClass="tabPage" runat="server" ondatabinding="pnlPublished_DataBinding">
        <asp:Panel ID="pnlActions" CssClass="actions" runat="server">
        <asp:LinkButton ID="lnkMark" CssClass="star" Text="Mark as Ready for Publishing" runat="server" 
            onclick="lnkMark_Click" />
        <asp:LinkButton ID="lnkUnMark" Text="Mark as Not Ready for Publishing" 
            runat="server" CssClass="cancel" onclick="lnkUnMark_Click" />
        <asp:LinkButton ID="lnkPubilsh" Text="Publish" runat="server" 
            onclick="lnkPubilsh_Click" />
        <asp:LinkButton ID="lnkRetire" Text="Retire" CssClass="cancel" runat="server" 
            onclick="lnkRetire_Click" />
        <asp:LinkButton ID="lnkSave" Text="Save" CssClass="save" runat="server" 
            />
        <asp:LinkButton ID="lnkCancel" Text="Cancel" CssClass="cancel" runat="server" 
            onclick="lnkCancel_Click" />
            <asp:LinkButton ID="lnkEdit" Text="Edit" CssClass="edit" runat="server" 
            onclick="lnkEdit_Click" />
        <asp:LinkButton ID="lnkDelete" Text="Delete" CssClass="delete" OnClientClick="return confirm('Are you sure');" OnClick="lnkDelete_Click" runat="server" />
    </asp:Panel>
    
        <asp:DetailsView ID="dvPublishingDates" DataSourceID="dsCurrentPost" AutoGenerateRows="false" runat="server">
            <Fields>
                <acms:DateTimeField HeaderText="Published From" Required="true" DataField="PublishFrom" />
                <acms:DateTimeField HeaderText="Published To" DataField="PublishTo" />
            </Fields>
        </asp:DetailsView>
    </asp:Panel>
    <asp:Panel ID="pnlPending" CssClass="tabPage" runat="server" 
        ondatabinding="pnlPending_DataBinding">
        <p id="pNotRequired" runat="server">This is a pending post that does not yet require publishing.</p>
        <p id="pMarked" runat="server">This is a pending post that is marked ready for publishing.</p>
        <p id="pNotMarked" runat="server">This is a pending post that has not been marked ready for publishing.</p>
        <asp:Panel ID="pnlPublishImmedatly" runat="server" Visible="false">
            <h2>Publish Immedatly</h2>
            <asp:Button ID="lnkPublishNow" Text="Publish Now" runat="server" 
                onclick="lnkPublishNow_Click"/> 
            <asp:Button ID="lnkPublishNowChildren" Text="Publish Now Including All Children" 
                runat="server" onclick="lnkPublishNowChildren_Click"/>
            <asp:Button ID="lnkPublishNowChildrenMarked" Text="Publish Including Children Marked Ready For Publishing" 
                runat="server" onclick="lnkPublishNowChildrenMarked_Click"/>
        </asp:Panel>
        <asp:Panel ID="pnlPublishDates" runat="server" Visible="false">
            <h2>Publish with Start and or End Dates</h2>
            <ul class="form">
                <li>
                    <asp:Label ID="Label1" AssociatedControlID="dtFrom" Text="Publish From" runat="server" />
                    <telerik:RadDateTimePicker ID="dtFrom" runat="server" 
                        Culture="English (United Kingdom)" >
                        <TimeView Culture="English (United Kingdom)">
                        </TimeView>
                        <DateInput InvalidStyleDuration="100">
                        </DateInput>
                    </telerik:RadDateTimePicker>
                </li>
                <li>
                    <asp:Label ID="Label2" AssociatedControlID="dtTo" Text="Publish To" runat="server" />
                    <telerik:RadDateTimePicker ID="dtTo" runat="server" />
                </li>
                <li class="buttons">
                    <asp:Button ID="lnkPublishDates" Text="Publish" runat="server" 
                        onclick="lnkPublishDates_Click"/> 
                    <asp:Button ID="lnkPublishDatesChildren" Text="Publish Including All Children" 
                        runat="server" onclick="lnkPublishDatesChildren_Click"/>
                    <asp:Button ID="lnkPublishDatesChildrenMarked" Text="Publish Including Children Marked Ready For Publishing" 
                        runat="server" onclick="lnkPublishDatesChildrenMarked_Click"/>
                </li>
            </ul>
        </asp:Panel>
    </asp:Panel>
    <asp:Panel ID="pnlRetire" CssClass="tabPage" runat="server">
        <h2>Retire Post</h2>
        <asp:Button ID="btnRetireThis" Text="Retire this version now" 
            OnClientClick='return confirm("Are you sure you want to retire this version");' 
            runat="server" onclick="btnRetireThis_Click"/>
        <asp:Button ID="btnRetireThisAndPending" Text="Retire this version and all other versions including pending versions" OnClientClick='return confirm("Are you sure you want to retire this version and all other versions");' runat="server"/>
    </asp:Panel>
    <acms:PostDataSource ID="dsCurrentPost" runat="server" 
        onselectdata="dsCurrentPost_SelectData" />
</asp:Content>

